/*
  *Copyright (c) 2024 Beijing University of Posts and Telecommunications.
  *Licensed under the Apache License, Version 2.0 (the "License");
  *you may not use this file except in compliance with the License.
  *You may obtain a copy of the License at

  *http://www.apache.org/licenses/LICENSE-2.0

  *Unless required by applicable law or agreed to in writing, software
  *distributed under the License is distributed on an "AS IS" BASIS,
  *WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  *See the License for the specific language governing permissions and
  *limitations under the License.
  */
import "console"

rule TestCaseRule_OpenHarmony_CVE_2024_42114
{
    meta:
        date = "2024-09-26"
        file = "/dev/block/platform/fe310000.sdhci/by-name/boot_linux"

    strings:
        $vul = {A8 82 23 91 F3 03 00 AA 08 FD DF C8 16 01 40 F9 C8 52 41 39}
        $fix = {D6 C2 00 91 F3 03 00 AA E0 03 16 AA 0F 40 51 94 A8 82 23 91 09 41 38 D5 08 FD DF C8 E1 03 13 AA}

    condition:
        ((not $vul) or $fix) and console.log("OpenHarmony-CVE-2024-42114 testcase pass")
}